package fr.unice.client;

import com.smartgwt.client.widgets.grid.ListGridRecord;

/**
 * Wrapper used by SmartGWT in order to fill a grid list of audio files.
 * 
 * @author PELLEGRINO Laurent
 * @author TROVATO Alexandre
 * 
 * @version 1.0
 */
public class AudioFileRecord extends ListGridRecord {
	public AudioFileRecord(String id, String name, String artist, String album,
			String year, String trackNumber, String genre, String duration,
			String uri) {
		this.setId(id);
		this.setName(name);
		this.setArtist(artist);
		this.setAlbum(album);
		this.setYear(year);
		this.setTrackNumber(trackNumber);
		this.setGenre(genre);
		this.setDuration(duration);
		this.setURI(uri);
	}

	public String getId() {
		return super.getAttributeAsString("id");
	}

	public String getName() {
		return super.getAttributeAsString("name");
	}

	public String getArtist() {
		return super.getAttributeAsString("artist");
	}

	public String getAlbum() {
		return super.getAttributeAsString("album");
	}

	public String getYear() {
		return super.getAttributeAsString("year");
	}

	public String getTrackNumber() {
		return super.getAttributeAsString("trackNumber");
	}

	public String getGenre() {
		return super.getAttributeAsString("genre");
	}

	public String getDuration() {
		return super.getAttributeAsString("duration");
	}

	public String getURI() {
		return super.getAttributeAsString("uri");
	}

	public void setId(String id) {
		super.setAttribute("id", id);
	}

	public void setName(String name) {
		super.setAttribute("name", name);
	}

	public void setArtist(String artist) {
		super.setAttribute("artist", artist);
	}

	public void setAlbum(String album) {
		super.setAttribute("album", album);
	}

	public void setYear(String year) {
		super.setAttribute("year", year);
	}

	public void setTrackNumber(String trackNumber) {
		super.setAttribute("trackNumber", trackNumber);
	}

	public void setGenre(String genre) {
		super.setAttribute("genre", genre);
	}

	public void setDuration(String duration) {
		super.setAttribute("duration", duration);
	}

	public void setURI(String uri) {
		super.setAttribute("uri", uri);
	}
}
